<?php

class My_Controller_Action_Helper_Timer extends Zend_Controller_Action_Helper_Abstract
{
    private $iStart;
    private $iStop;

    public function timer( )
    {
        return self::getmicrotime();
    }

    public function t( $iStart, $iStop )
    {
        echo '<br/>Czas: <b>' . round( $iStop - $iStart, 4 ) . '</b> sekundy.<br/>';
    }

    public function getmicrotime()
    {
        list( $usec, $sec ) = explode( " ", microtime() );
        return ( (float)$usec + (float)$sec );
    }

}